package com.zhang.servicemap.service.impl;

import com.zhang.internalcommon.dto.ResponseResult;
import com.zhang.internalcommon.response.TerminalResponse;
import com.zhang.internalcommon.response.TrsearchResponse;
import com.zhang.servicemap.remote.TerminalClient;
import com.zhang.servicemap.service.TerminalService;
import jdk.nashorn.internal.ir.Terminal;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 类功能描述
 *
 * @author Kye
 * @date 2025-04-15
 */
@Service
public class TerminalServiceImpl implements TerminalService {
	@Autowired
	private TerminalClient terminalClient;

	@Override
	public ResponseResult addTerminal(String name,String desc) {
		ResponseResult<TerminalResponse> res = terminalClient.add(name,desc);
		return res;
	}

	@Override
	public ResponseResult<List<TerminalResponse>> aroundSearch(String center, Integer radius) {
		return terminalClient.aroundSearch(center,radius);
	}

	@Override
	public ResponseResult<TrsearchResponse> trsearch(String tid, Long starttime, Long endtime) {
		return terminalClient.trsearch(tid,starttime,endtime);
	}
}
